<?php
namespace ImiApp\Module\Member\Service\Base;

use Imi\Model\Model;
use Imi\Model\Annotation\DDL;
use Imi\Model\Annotation\Table;
use Imi\Model\Annotation\Column;
use Imi\Model\Annotation\Entity;

/**
 * 邮箱验证码表 基类
 * @Entity
 * @Table(name="sc_ems", id={"id"})
 * @DDL("CREATE TABLE `sc_ems` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `event` varchar(30) COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '事件',
  `email` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '邮箱',
  `code` varchar(10) COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '验证码',
  `times` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '验证次数',
  `ip` varchar(30) COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT 'IP',
  `createtime` int(10) DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=COMPACT COMMENT='邮箱验证码表'")
 * @property int $id ID
 * @property string $event 事件
 * @property string $email 邮箱
 * @property string $code 验证码
 * @property int $times 验证次数
 * @property string $ip IP
 * @property int $createtime 创建时间
 */
abstract class ScEmsBase extends Model
{
    /**
     * ID
     * id
     * @Column(name="id", type="int", length=10, accuracy=0, nullable=false, default="", isPrimaryKey=true, primaryKeyIndex=0, isAutoIncrement=true)
     * @var int
     */
    protected $id;

    /**
     * 获取 id - ID
     *
     * @return int
     */ 
    public function getId()
    {
        return $this->id;
    }

    /**
     * 赋值 id - ID
     * @param int $id id
     * @return static
     */ 
    public function setId($id)
    {
        $this->id = $id;
        return $this;
    }

    /**
     * 事件
     * event
     * @Column(name="event", type="varchar", length=30, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var string
     */
    protected $event;

    /**
     * 获取 event - 事件
     *
     * @return string
     */ 
    public function getEvent()
    {
        return $this->event;
    }

    /**
     * 赋值 event - 事件
     * @param string $event event
     * @return static
     */ 
    public function setEvent($event)
    {
        $this->event = $event;
        return $this;
    }

    /**
     * 邮箱
     * email
     * @Column(name="email", type="varchar", length=100, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var string
     */
    protected $email;

    /**
     * 获取 email - 邮箱
     *
     * @return string
     */ 
    public function getEmail()
    {
        return $this->email;
    }

    /**
     * 赋值 email - 邮箱
     * @param string $email email
     * @return static
     */ 
    public function setEmail($email)
    {
        $this->email = $email;
        return $this;
    }

    /**
     * 验证码
     * code
     * @Column(name="code", type="varchar", length=10, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var string
     */
    protected $code;

    /**
     * 获取 code - 验证码
     *
     * @return string
     */ 
    public function getCode()
    {
        return $this->code;
    }

    /**
     * 赋值 code - 验证码
     * @param string $code code
     * @return static
     */ 
    public function setCode($code)
    {
        $this->code = $code;
        return $this;
    }

    /**
     * 验证次数
     * times
     * @Column(name="times", type="int", length=10, accuracy=0, nullable=false, default="0", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var int
     */
    protected $times;

    /**
     * 获取 times - 验证次数
     *
     * @return int
     */ 
    public function getTimes()
    {
        return $this->times;
    }

    /**
     * 赋值 times - 验证次数
     * @param int $times times
     * @return static
     */ 
    public function setTimes($times)
    {
        $this->times = $times;
        return $this;
    }

    /**
     * IP
     * ip
     * @Column(name="ip", type="varchar", length=30, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var string
     */
    protected $ip;

    /**
     * 获取 ip - IP
     *
     * @return string
     */ 
    public function getIp()
    {
        return $this->ip;
    }

    /**
     * 赋值 ip - IP
     * @param string $ip ip
     * @return static
     */ 
    public function setIp($ip)
    {
        $this->ip = $ip;
        return $this;
    }

    /**
     * 创建时间
     * createtime
     * @Column(name="createtime", type="int", length=10, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var int
     */
    protected $createtime;

    /**
     * 获取 createtime - 创建时间
     *
     * @return int
     */ 
    public function getCreatetime()
    {
        return $this->createtime;
    }

    /**
     * 赋值 createtime - 创建时间
     * @param int $createtime createtime
     * @return static
     */ 
    public function setCreatetime($createtime)
    {
        $this->createtime = $createtime;
        return $this;
    }

}
